Package-level declarations

Types

Link copied to clipboard
fun interface Action
Link copied to clipboard
data class ActivityCtx<out T : ProcessedUpdate>(val update: T)
Link copied to clipboard
fun interface BreakCondition
Link copied to clipboard
@Serializable(with = BusinessConnectionUpdate.Companion::class)
data class BusinessConnectionUpdate(val updateId: Int, val origin: Update, val businessConnection: BusinessConnection) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = BusinessMessageUpdate.Companion::class)
data class BusinessMessageUpdate(val updateId: Int, val origin: Update, val businessMessage: Message) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = CallbackQueryUpdate.Companion::class)
data class CallbackQueryUpdate(val updateId: Int, val origin: Update, val callbackQuery: CallbackQuery) : ProcessedUpdate, UserReference
Link copied to clipboard
abstract class ChainLink : Link<Unit>
Link copied to clipboard
@Serializable(with = ChannelPostUpdate.Companion::class)
data class ChannelPostUpdate(val updateId: Int, val origin: Update, val channelPost: Message) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = ChatBoostUpdate.Companion::class)
data class ChatBoostUpdate(val updateId: Int, val origin: Update, val chatBoost: ChatBoostUpdated) : ProcessedUpdate
Link copied to clipboard
@Serializable(with = ChatJoinRequestUpdate.Companion::class)
data class ChatJoinRequestUpdate(val updateId: Int, val origin: Update, val chatJoinRequest: ChatJoinRequest) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = ChatMemberUpdate.Companion::class)
data class ChatMemberUpdate(val updateId: Int, val origin: Update, val chatMember: ChatMemberUpdated) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = ChosenInlineResultUpdate.Companion::class)
data class ChosenInlineResultUpdate(val updateId: Int, val origin: Update, val chosenInlineResult: ChosenInlineResult) : ProcessedUpdate, UserReference
Link copied to clipboard
data class CommandContext<out T : ProcessedUpdate>(val update: T, val parameters: Map<String, String>)
Link copied to clipboard
sealed class CommonMatcher
Link copied to clipboard
@Serializable
enum Currency : Enum<Currency>
Link copied to clipboard
@Serializable(with = DeletedBusinessMessagesUpdate.Companion::class)
data class DeletedBusinessMessagesUpdate(val updateId: Int, val origin: Update, val deletedBusinessMessages: BusinessMessagesDeleted) : ProcessedUpdate
Link copied to clipboard
@Serializable(with = EditedBusinessMessageUpdate.Companion::class)
data class EditedBusinessMessageUpdate(val updateId: Int, val origin: Update, val editedBusinessMessage: Message) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = EditedChannelPostUpdate.Companion::class)
data class EditedChannelPostUpdate(val updateId: Int, val origin: Update, val editedChannelPost: Message) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = EditedMessageUpdate.Companion::class)
data class EditedMessageUpdate(val updateId: Int, val origin: Update, val editedMessage: Message) : ProcessedUpdate, UserReference
Link copied to clipboard

Strategies to do with exceptions and updates that caused them.

Link copied to clipboard
data class FailedUpdate(val exception: Throwable, val update: ProcessedUpdate)
Link copied to clipboard

Proxy enum class for Ktor log leveling.

Link copied to clipboard
@Serializable(with = Identifier.Serde::class)
sealed class Identifier
Link copied to clipboard
interface IdLong
Link copied to clipboard
@Serializable(with = ImplicitFile.Companion::class)
sealed class ImplicitFile
Link copied to clipboard
@Serializable(with = InlineQueryUpdate.Companion::class)
data class InlineQueryUpdate(val updateId: Int, val origin: Update, val inlineQuery: InlineQuery) : ProcessedUpdate, UserReference
Link copied to clipboard
data class InputBreakPoint(val condition: ActivityCtx<ProcessedUpdate>.() -> Boolean, val activity: OnInputActivity? = null, val repeat: Boolean = true)
Link copied to clipboard
@Serializable
data class InputFile(val data: ByteArray, val fileName: String = DEFAULT_FILENAME, val contentType: String = DEFAULT_CONTENT_TYPE)
Link copied to clipboard
data class InvocationMeta(val qualifier: String, val function: String, val rateLimits: RateLimits = RateLimits.NOT_LIMITED, val guard: KClass<out Guard> = DefaultGuard::class, val argParser: KClass<out ArgumentParser> = DefaultArgParser::class)
Link copied to clipboard
enum LogLvl : Enum<LogLvl>

Proxy enum for Bot logger leveling.

Link copied to clipboard
@Serializable(with = MessageReactionCountUpdate.Companion::class)
data class MessageReactionCountUpdate(val updateId: Int, val origin: Update, val messageReactionCount: MessageReactionCountUpdated) : ProcessedUpdate
Link copied to clipboard
@Serializable(with = MessageReactionUpdate.Companion::class)
data class MessageReactionUpdate(val updateId: Int, val origin: Update, val messageReaction: MessageReactionUpdated) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = MessageUpdate.Companion::class)
data class MessageUpdate(val updateId: Int, val origin: Update, val message: Message) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = MyChatMemberUpdate.Companion::class)
data class MyChatMemberUpdate(val updateId: Int, val origin: Update, val myChatMember: ChatMemberUpdated) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = PollAnswerUpdate.Companion::class)
data class PollAnswerUpdate(val updateId: Int, val origin: Update, val pollAnswer: PollAnswer) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = PollUpdate.Companion::class)
data class PollUpdate(val updateId: Int, val origin: Update, val poll: Poll) : ProcessedUpdate
Link copied to clipboard
@Serializable(with = PreCheckoutQueryUpdate.Companion::class)
data class PreCheckoutQueryUpdate(val updateId: Int, val origin: Update, val preCheckoutQuery: PreCheckoutQuery) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = ProcessedUpdate.Companion::class)
sealed class ProcessedUpdate : TextReference, MultipleResponse
Link copied to clipboard
@Serializable(with = PurchasedPaidMediaUpdate.Companion::class)
data class PurchasedPaidMediaUpdate(val updateId: Int, val origin: Update, val purchasedPaidMedia: PaidMediaPurchased) : ProcessedUpdate, UserReference
Link copied to clipboard
@Serializable(with = RemovedChatBoostUpdate.Companion::class)
data class RemovedChatBoostUpdate(val updateId: Int, val origin: Update, val removedChatBoost: ChatBoostRemoved) : ProcessedUpdate
Link copied to clipboard
@Serializable
sealed class Response<T>
Link copied to clipboard
@Serializable(with = ShippingQueryUpdate.Companion::class)
data class ShippingQueryUpdate(val updateId: Int, val origin: Update, val shippingQuery: ShippingQuery) : ProcessedUpdate, UserReference
Link copied to clipboard
interface TextReference
Link copied to clipboard
@Serializable
enum UpdateType : Enum<UpdateType>
Link copied to clipboard
interface UserReference

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun <T, R> Deferred<Response<out T>>.foldResponse(success: Response.Success<T>.() -> R, failure: Response.Failure.() -> R): R

Handles response success and failure cases.

Link copied to clipboard
fun <T> Response<T>.getOrNull(): T?

Get response or null on failure.

inline suspend fun <T> Deferred<Response<out T>>.getOrNull(): T?
Link copied to clipboard
Link copied to clipboard

Whether the request completed successfully.

Link copied to clipboard
inline fun <T> Response<T>.onFailure(block: (Response.Failure) -> Unit): T?

inline suspend fun <T> Deferred<Response<out T>>.onFailure(block: (Response.Failure) -> Unit): T?

Handles request's failure case.